package com.ruoyi.club.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.club.mapper.ClubRecruitmentMapper;
import com.ruoyi.club.domain.ClubRecruitment;
import com.ruoyi.club.service.IClubRecruitmentService;

/**
 * 社团招聘Service业务层处理
 * 
 * @author Zou
 * @date 2025-11-14
 */
@Service
public class ClubRecruitmentServiceImpl implements IClubRecruitmentService 
{
    @Autowired
    private ClubRecruitmentMapper clubRecruitmentMapper;

    /**
     * 查询社团招聘
     * 
     * @param id 社团招聘主键
     * @return 社团招聘
     */
    @Override
    public ClubRecruitment selectClubRecruitmentById(Long id)
    {
        return clubRecruitmentMapper.selectClubRecruitmentById(id);
    }

    /**
     * 查询社团招聘列表
     * 
     * @param clubRecruitment 社团招聘
     * @return 社团招聘
     */
    @Override
    public List<ClubRecruitment> selectClubRecruitmentList(ClubRecruitment clubRecruitment)
    {
        return clubRecruitmentMapper.selectClubRecruitmentList(clubRecruitment);
    }

    /**
     * 新增社团招聘
     * 
     * @param clubRecruitment 社团招聘
     * @return 结果
     */
    @Override
    public int insertClubRecruitment(ClubRecruitment clubRecruitment)
    {
        clubRecruitment.setCreateTime(DateUtils.getNowDate());
        return clubRecruitmentMapper.insertClubRecruitment(clubRecruitment);
    }

    /**
     * 修改社团招聘
     * 
     * @param clubRecruitment 社团招聘
     * @return 结果
     */
    @Override
    public int updateClubRecruitment(ClubRecruitment clubRecruitment)
    {
        clubRecruitment.setUpdateTime(DateUtils.getNowDate());
        return clubRecruitmentMapper.updateClubRecruitment(clubRecruitment);
    }

    /**
     * 批量删除社团招聘
     * 
     * @param ids 需要删除的社团招聘主键
     * @return 结果
     */
    @Override
    public int deleteClubRecruitmentByIds(Long[] ids)
    {
        return clubRecruitmentMapper.deleteClubRecruitmentByIds(ids);
    }

    /**
     * 删除社团招聘信息
     * 
     * @param id 社团招聘主键
     * @return 结果
     */
    @Override
    public int deleteClubRecruitmentById(Long id)
    {
        return clubRecruitmentMapper.deleteClubRecruitmentById(id);
    }
}
